<?php

namespace app\api\controller;

use app\common\controller\Api;

/**
 * 首页接口
 */
class Products extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function getProductInfo()
    {

        $id = $this->request->request('id');

        $productsModel = new \app\common\model\Products();

        $result = $productsModel->getProductInfo($id);

        if ($result['status']){
            $this->success('i18n:186',$result['data']);
        }else{
            $msg = $result['msg'];
            $this->success($msg);
        }
    }

}
